<template>
  <div>
    <el-empty v-show="applyList.length===0" description="暂无待审批项目" image-size="300px"
              image="http://localhost:99/Public/file/空空如也.png"></el-empty>
    <el-table
        v-show="applyList.length!==0"
        :data="applyList"
        height="800px"
        border
        style="width: 100%">
      <el-table-column
          fixed
          prop="applyId"
          label="编号"
          width="70">
      </el-table-column>
      <el-table-column
          prop="projectName"
          label="项目名称"
          width="180">
      </el-table-column>
      <el-table-column
          prop="name"
          label="姓名"
          width="80">
      </el-table-column>
      <el-table-column
          prop="major"
          label="专业"
          width="120">
      </el-table-column>
      <el-table-column
          prop="phone"
          label="电话号码"
          width="120">
      </el-table-column>
      <el-table-column
          prop="address"
          label="地址"
          width="120">
      </el-table-column>
      <el-table-column
          prop="applyTime"
          label="申请时间"
          width="180">
      </el-table-column>
      <el-table-column
          fixed="right"
          label="操作"
          width="90">
        <template slot-scope="scope">
          <el-button @click="toCheckInfo(scope.row)" type="text" size="small">查看</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  name: "CheckProjectList",
  data() {
    return {
      applyList: []
    }
  },
  mounted() {
    this.getApplyList()
  },
  methods: {
    getApplyList() {
      this.$axios.post("/apply/getAllApply?role=" + this.$store.getters.getUser.role).then(res => {
        this.applyList = res.data.data
      })
    },
    toCheckInfo(row) {
      console.log(row)
      this.$router.push({
        path: "/checkInfo", query: {
          applyId: row.applyId,
        }
      })
    }
  }
}
</script>

<style scoped>

</style>